package com.dhcc.bpm.modules.scf.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dhcc.bpm.modules.scf.dto.ScfOperationLogInfoDTO;
import com.dhcc.bpm.modules.scf.service.IScfOperationLogInfoService;
import com.dhcc.bpm.modules.scf.vo.ScfOperationLogInfoVO.ScfOperationLogInfoVO;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 操作轨迹表 控制器
 *
 * @author liuguoting
 * @since 2023-11-13
 */
@RestController
@AllArgsConstructor
@Slf4j
public class ScfOperationLogInfoController extends BladeController {

	private IScfOperationLogInfoService scfOperationLogInfoService;

	/**
     * 分页查询操作日志列表
	 */
    @GetMapping("scfOperationLogList")
    // @Cacheable(value = "scfOperationLogListCache", key = "'scfOperationLogListCacheKey-' + #scfOperationLogInfo.hashCode() + '-' + #query.hashCode()", unless = "#result == null")
    public R<IPage<ScfOperationLogInfoVO>> page(ScfOperationLogInfoDTO scfOperationLogInfo, Query query) {
        log.info("接收到参数：{}", scfOperationLogInfo);
        log.info("接收到分页参数：{}", query);
		IPage<ScfOperationLogInfoVO> pages = scfOperationLogInfoService.selectScfOperationLogInfoPage(Condition.getPage(query), scfOperationLogInfo);
		return R.data(pages);
	}
}
